#pragma once
#include <string>

#ifdef SIMPLE_LOG_EXPORTS
#define SIMPLE_LOG_API	__declspec(dllexport)
#else
#define SIMPLE_LOG_API	__declspec(dllimport)
#endif

class SimpleLog {
public:
    enum SIMPLE_LOG_LEVEL
    {
        kLevelDebug = 0,
        kLevelInfo,
        kLevelWarning,
        kLevelFatal,
    };

    virtual ~SimpleLog() {}

    virtual bool Create(const std::wstring& file_name, bool overwrite, SimpleLog::SIMPLE_LOG_LEVEL level) = 0;
    virtual void SetLevel(SimpleLog::SIMPLE_LOG_LEVEL level) = 0;
    virtual void WriteLog(SimpleLog::SIMPLE_LOG_LEVEL level, const std::wstring& log) = 0;
    virtual void WriteFormatLog(SimpleLog::SIMPLE_LOG_LEVEL level, const wchar_t* format, ...) = 0;
};

SIMPLE_LOG_API SimpleLog* CreateSimpleLog();
SIMPLE_LOG_API void DestroySimpleLog(SimpleLog* slog);